import request from '@/config/axios'

// 纤盘 VO
export interface FiberDiskVO {
  id: number // 编号
  fiberDiskCode: string // 纤盘编号
  fiberDiskModel: string // 纤盘型号
}

// 纤盘 API
export const FiberDiskApi = {
  // 查询纤盘分页
  getFiberDiskPage: async (params: any) => {
    return await request.get({ url: `/opticore/fiber-disk/page`, params })
  },

  // 查询纤盘详情
  getFiberDisk: async (id: number) => {
    return await request.get({ url: `/opticore/fiber-disk/get?id=` + id })
  },

  // 新增纤盘
  createFiberDisk: async (data: FiberDiskVO) => {
    return await request.post({ url: `/opticore/fiber-disk/create`, data })
  },

  // 修改纤盘
  updateFiberDisk: async (data: FiberDiskVO) => {
    return await request.put({ url: `/opticore/fiber-disk/update`, data })
  },

  // 删除纤盘
  deleteFiberDisk: async (id: number) => {
    return await request.delete({ url: `/opticore/fiber-disk/delete?id=` + id })
  },

  // 导出纤盘 Excel
  exportFiberDisk: async (params) => {
    return await request.download({ url: `/opticore/fiber-disk/export-excel`, params })
  },
}